/**
 * 
 */
package web.common.entity;

import java.util.Date;

/**
 * 项目名称：ebs 
 * @ClassName: Product
 * @author ZK JIA<br>
 * 创建时间： 2013-11-6 下午10:02:04<br>
 * @version 1.1<br>
 * 描述: TODO(产品类)<br>
 */

public class Product extends BaseEntity{

	
	
	/**
	
	* <p>Title: </p>
	
	* <p>Description: </p>
	
	* @param createTime
	* @param updateTime
	* @param createBy
	* @param productCode
	* @param productName
	* @param userCode
	* @param userType
	* @param styleCode
	* @param price
	* @param style
	* @param user
	
	*/
	public Product(Date createTime, Date updateTime, String createBy,
			String productCode, String productName, String userCode,
			int userType, String styleCode, double price, ProductStyle style, User user) {
		super(createTime, updateTime, createBy);
		this.productCode = productCode;
		this.productName = productName;
		this.userCode = userCode;
		this.userType = userType;
		this.styleCode = styleCode;
		this.price = price;
		this.style = style;
		this.user = user;
	}
	private String productCode;//产品编码
	private String productName;//产品名称
	private String userCode;//用户编码
	private int userType;//用户类型
	private String styleCode;//风格编码
	private double price;//价格
	
	
	private ProductStyle style;//风格类型
	private User user;//所属用户
	public String getProductCode() {
		return productCode;
	}
	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getUserCode() {
		return userCode;
	}
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	public int getUserType() {
		return userType;
	}
	public void setUserType(int userType) {
		this.userType = userType;
	}
	public String getStyleCode() {
		return styleCode;
	}
	public void setStyleCode(String styleCode) {
		this.styleCode = styleCode;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public ProductStyle getStyle() {
		return style;
	}
	public void setStyle(ProductStyle style) {
		this.style = style;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((productCode == null) ? 0 : productCode.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Product other = (Product) obj;
		if (productCode == null) {
			if (other.productCode != null)
				return false;
		} else if (!productCode.equals(other.productCode))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Product [price=" + price + ", productCode=" + productCode
				+ ", productName=" + productName + ", style=" + style
				+ ", styleCode=" + styleCode + ", user=" + user + ", userCode="
				+ userCode + ", userType=" + userType + ", createBy="
				+ createBy + ", createTime=" + createTime + ", updateTime="
				+ updateTime + "]";
	}
	
	
	
}
